package com.letoken.platform.repo.admin.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * App系统版本信息表
 * </p>
 *
 * @author 作者
 * @since 2022-12-12
 */
@Getter
@Setter
@TableName("app_version")
@ApiModel(value = "AppVersion对象", description = "App系统版本信息表")
public class AppVersion extends Model<AppVersion> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("客户端：1：Android，2：IOS")
    @TableField("client")
    private Integer client;

    @ApiModelProperty("版本名字")
    @TableField("name")
    private String name;

    @ApiModelProperty("当前版本(版本号)")
    @TableField("current_version")
    private String currentVersion;

    @ApiModelProperty("版本信息(更新内容)")
    @TableField("version_info")
    private String versionInfo;

    @ApiModelProperty("更新标题")
    @TableField("version_title")
    private String versionTitle;

    @ApiModelProperty("应用市场下载链接")
    @TableField("market_download_link")
    private String marketDownloadLink;

    @ApiModelProperty("是否强制升级 0不强制，1：强制")
    @TableField("is_forced_upgrade")
    private Boolean isForcedUpgrade;

    @ApiModelProperty("上架状态默认为不上架，0上架，1不上架")
    @TableField("on_state")
    private Boolean onState;

    @ApiModelProperty("最低兼容版本")
    @TableField("lowest_compatible_version")
    private String lowestCompatibleVersion;

    @ApiModelProperty("创建日期")
    @TableField("create_time")
    private LocalDateTime createTime;


    @Override
    public Serializable pkVal() {
        return this.id;
    }

}
